println sum2(1)
println sum(1,2)
println sum(1,2,3)

int sum(int ... var) {
    def total = 0
    for (i in var)
        total += i
    return total 
}
//不关心返回类型
def sum2( ... var) {
    def total = 0
    for (i in var)
        total += i
    total //return 可以省略
}
